using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using System.Diagnostics;


namespace HelloXNA2.Component.Audio
{
    /// <summary>
    /// This is a game component that implements IUpdateable.
    /// </summary>
    public class SoundEffectDemo : Microsoft.Xna.Framework.DrawableGameComponent
    {
        public SoundEffectDemo(Game game)
            : base(game)
        {
            // TODO: Construct any child components here
        }

        
        public override void Initialize()
        {
            // TODO: Add your initialization code here

            base.Initialize();
        }


        protected override void LoadContent()
        {

            SoundEffect soundEffect;
            soundEffect = Game.Content.Load<SoundEffect>("Audio/Thunder");
            soundEffect.Play(0.5f, -1f, 0f);
            Debug.WriteLine(soundEffect.Duration.TotalSeconds.ToString(), "Duration");

            base.LoadContent();
        }

        public override void Update(GameTime gameTime)
        {
            // TODO: Add your update code here

            base.Update(gameTime);
        }
    }
}
